git-sigstate_thread_reference
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 23 Aug 2021 19:31:23 +0000 (20:31 +0100)
committerAurelien Jarno <aurel32@debian.org>
Mon, 23 Aug 2021 19:31:23 +0000 (20:31 +0100)
commitd8c567918da7ad29dc8e9cd2b1ecc1ee24ed54a6
treea3de6355356c872f7ca99dc8eed0937d11767416
parentfa8d6e374e3fd84d60890ee60fc8ffb4d91f6393
git-sigstate_thread_reference

Committed for 2.33

From: Richard Braun <rbraun@sceen.net>
Subject: [PATCH] Hurd: make sigstates hold a reference on thread ports

This change is required in order to correctly release per-thread
resources. Directly reusing the threading library reference isn't
possible since the sigstate is also used early in the main thread,
before threading is initialized.

* hurd/hurd/signal.h (_hurd_self_sigstate): Drop thread reference after
calling _hurd_thread_sigstate.
(_hurd_critical_section_lock): Likewise.
* hurd/hurdsig.c (_hurd_thread_sigstate): Add a reference on the thread.
(_hurd_sigstate_delete): Drop thread reference.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-sigstate_thread_reference.diff
hurd/hurd/signal.h
hurd/hurdsig.c